package com.atjinggu.jinggumail.seckill.schedule;

import com.mysql.cj.util.TimeUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * @author jingming
 * @Type HelloSchedule.java
 * @Desc
 * @date 2021/3/23 11:02
 */
@Slf4j
@Component
public class HelloSchedule {

    //@Async
    //@Scheduled(cron = "* * * * * ?")
    public void hello() throws InterruptedException {
        System.out.println("hello..............");
        TimeUnit.SECONDS.sleep(3);
    }
}